package com.atguigu.lease.common.exceptions;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

/**
 * @author: LHJ
 * @date: 2024/11/6 9:41
 * @description:
 */
@Data
public class LeaseException extends  RuntimeException{

    private ResultCodeEnum resultCodeEnum;


    public LeaseException(ResultCodeEnum resultCodeEnum) {
        // 将错误描述传递给异常的message属性
        super(resultCodeEnum.getMessage());
        this.resultCodeEnum = resultCodeEnum;
    }
}

